home *** CD-ROM | disk | FTP | other *** search
Java Source | 2000-06-23 | 3.4 KB | 141 lines |
- import java.awt.*;
- import java.awt.event.ActionListener;
- import java.awt.event.ActionEvent;
- import java.awt.event.KeyEvent;
- import java.io.File;
- import java.util.Vector;
-
- import com.apple.mrj.MRJApplicationUtils;
- import com.apple.mrj.MRJOpenDocumentHandler;
- import com.apple.mrj.MRJQuitHandler;
- import com.apple.mrj.MRJAboutHandler;
-
- public class SlideShow extends Frame
- {
- //Declare and define constants
- //Insert "SlideShow Constants"
-
- //Declare data members
- //Insert "SlideShow data members"
-
- //DECLARE_MENUS
- //Declare Menus, Menu Items and the Menu Bar
- //Insert "SlideShow declare menus"
-
- /**
- * The entry point to our application
- */
- static public void main(String args[])
- {
- //Instantiate our SlideShow, make it visible, and register our MRJ handlers.
- //Insert "SlideShow main"
- }
-
- public SlideShow()
- {
- //INIT_STATE
- //Initialize state information
- //Insert "SlideShow init state"
-
- //INIT_CONTROLS
- //Setup and configure our SlideShow
- //Insert "SlideShow init controls"
-
- //INIT_MENUS
- //Create, configure, and setup the menubar, menus, and menu items.
- //Insert "SlideShow init menus"
-
- //REGISTER_LISTENERS
- //Register ActionListeners with the menu items and the controller.
- //Insert "SlideShow register listeners"
- }
-
- /**
- * Starts or stops cycling forward through the list of image files to display.
- */
- public void togglePlaying()
- {
- //Handle starting and stopping the automatic progression of the show.
- //Insert "SlideShow togglePlaying"
- }
-
- //Inner class to implement our automatic progression of the show.
- //Insert "SlideShow PlayRunnable"
-
- /**
- * Steps the slide show forward or backwards by one image.
- * @param if true, step forward, if false, step backward.
- */
- public void oneStep(boolean isForward)
- {
- //Handle stepping forward or backward in the list of image files,
- //load the image, and repainting.
- //Insert "SlideShow oneStep"
- }
-
- /**
- * Handles sizing of the window to utilize the full screen size, or to use the size of the image.
- */
- public void toggleFullScreen()
- {
- //Handle toggling the frame window size between the image size, screen size, and full screen.
- //Insert "SlideShow toggleFullScreen"
- }
-
- /**
- * Shows or hides the control window.
- */
- public void toggleControls()
- {
- //Handle toggling the visibility of the controller
- //Insert "SlideShow toggleControls"
- }
-
- /**
- * Gets called when the user chooses the Quit menu item, or when the
- * application receives a quit message from the Finder (or other app).
- */
- protected void doOnQuit()
- {
- //Handle cleaning up, and quit.
- //Insert "SlideShow doOnQuit"
- }
-
- /**
- * Gets called when the user selects the about menu item in the Apple Menu.
- */
- protected void doAbout()
- {
- //Handle displaying about information here
- //Insert "SlideShow doAbout"
- }
-
- public void paint(Graphics g)
- {
- //Handle scaling and drawing the image to fit in the frame content area.
- //Insert "SlideShow paint"
- }
-
- public void setVisible(boolean b)
- {
- //Make sure the controls are visible only when the frame is visible.
- //Insert "SlideShow setVisible"
- }
-
-
- protected void registerMRJHandlers()
- {
- //Register MRJ handlers for open, about and quit.
- //Insert "SlideShow registerMRJHandlers"
- }
-
- //Inner class defining the MRJ Interface
- //Insert "SlideShow MRJI"
-
- //Inner class for handling ActionEvents
- //Insert "SlideShow Action"
-
- //Routines for handling the various ActionEvents
- //Insert "SlideShow Action Management"
- }
-